﻿<%@ Page Language="C#" MasterPageFile="~/default-nomenu.Master" AutoEventWireup="true" CodeBehind="lojacadastro.aspx.cs" Inherits="CeA.Reports.Atendimento.Web.admin.lojacadastro" Title="Cadastro de Loja" %>
<%@ PreviousPageType TypeName="CeA.Reports.Atendimento.Web.admin.loja" %>
<%@ Register src="../inc/WebControls/PesquisaRfs.ascx" tagname="PesquisaRfs" tagprefix="search" %>
<%@ Register src="../inc/WebControls/PesquisaRegiao.ascx" tagname="PesquisaRegiao" tagprefix="search" %>
<%@ Register src="../inc/WebControls/PesquisaEspecialista.ascx" tagname="PesquisaEspecialista" tagprefix="search" %>
<%@ Register src="../inc/WebControls/MessageBox.ascx" tagname="MessageBox" tagprefix="msgbox" %>

<asp:Content ID="head" ContentPlaceHolderID="head" runat="server">
  <link rel="Stylesheet" href="/css/popup.css" type="text/css" />
</asp:Content>

<asp:Content ID="body" ContentPlaceHolderID="BodyContentPlaceholder" runat="server">
<asp:Panel ID="pageContainer" runat="server"> <!-- ugly hack! -->
  <h1>Cadastro de Loja</h1>
   
  <h2>Identificaç&atilde;o da Loja</h2>
  
  <table cellpadding="1px" cellspacing="1px" style="width:810px" border="0">
    <tr>
      <td><label for="txtSigla" class="label">Sigla</label></td>      
      <td style="width:auto">
        <asp:TextBox ID="txtSigla" runat="server" CssClass="text-field" MaxLength="128" Width="100px" /> *
        <asp:RequiredFieldValidator ID="rfvSigla" runat="server" ControlToValidate="txtSigla" Text="(obrigatório)" EnableClientScript="true"/> 
      </td>
    </tr>
    
    <tr>
      <td style="width:80px"><label for="txtNome" class="label">Nome</label></td>      
      <td style="width:auto">
        <asp:TextBox ID="txtNome" runat="server" CssClass="text-field" MaxLength="128" Width="613px" />&nbsp;*
        <asp:RequiredFieldValidator ID="rfvNome" runat="server" ControlToValidate="txtNome" Text="(obrigatório)" EnableClientScript="true"/> 
      </td>
    </tr>
    
    <tr>
      <td><label for="txtRfs"  class="label">RFS</label></td>      
      <td>
        <asp:TextBox ID="txtRfs" runat="server" CssClass="text-field" MaxLength="128" ReadOnly="true" Width="325px"  />
        <asp:Button ID="cmdPesquisarRfs" runat="server" CssClass="search-buttom" CausesValidation="false" /> *
        <asp:RequiredFieldValidator ID="rfvRfs" runat="server" ControlToValidate="txtRfs" Text="(obrigatório)" EnableClientScript="true"/> 
      </td>
    </tr>
    
    <tr>
      <td><label for="txtRegiao" class="label">Regi&atilde;o</label></td>      
      <td style="width:auto">
        <asp:TextBox ID="txtRegiao" runat="server" CssClass="text-field" MaxLength="128" ReadOnly="true" Width="325px" />
        <asp:Button ID="cmdPesquisarRegiao" runat="server" CssClass="search-buttom" CausesValidation="false" /> *
        <asp:RequiredFieldValidator ID="rfvRegiao" runat="server" ControlToValidate="txtRegiao" Text="(obrigatório)" EnableClientScript="true"/> 
      </td>
    </tr>
    
    <tr>
      <td><label for="txtEspecilista" class="label">Especialista</label></td>      
      <td style="width:auto">
        <asp:TextBox ID="txtEspecialista" runat="server" CssClass="text-field" MaxLength="128" ReadOnly="true" Width="325px" />
        <asp:Button ID="cmdPesquisarEspecialista" runat="server" CssClass="search-buttom" CausesValidation="false" /> *
        <asp:RequiredFieldValidator ID="rfvEspecialista" runat="server" ControlToValidate="txtEspecialista" Text="(obrigatório)" EnableClientScript="true"/> 
      </td>
    </tr>
    
    <tr>
      <td colspan="2">
        <span class="form-note">* Campos Obrigatórios</span>
      </td>
    </tr>
  </table>
  <div class="break">
    <asp:Button ID="cmdVoltar" runat="server" Text="Voltar" CssClass="form-buttom" CausesValidation="false" />
    <asp:Button ID="cmdEditar" runat="server" Text="Editar" CssClass="form-buttom" CausesValidation="false" Visible="false" />
    <asp:Button ID="cmdSalvar" runat="server" Text="Salvar" CssClass="form-buttom" />
  </div>
  
  <br />
    
  <h2>Detalhes da Loja</h2>
  <table cellpadding="1px" cellspacing="1px" style="width:700px" border="0">
    <tr>
      <td style="width:80px"><label for="txtUF" class="label">UF</label></td>      
      <td style="width:20px">
        <asp:TextBox ID="txtUF" runat="server" CssClass="text-field" MaxLength="2" Width="100%" />
      </td>
      <td style="width:50px" class="alc">
        <label for="txtCidade" class="label">Cidade</label>
      </td>      
      <td>
        <asp:TextBox ID="txtCidade" runat="server" CssClass="text-field" MaxLength="128" Width="100%" />
      </td>
      <td style="width:30px" class="alc">
        <label for="txtCEP"  class="label">CEP</label></td>      
      <td style="width:70px">
        <asp:TextBox ID="txtCEP" runat="server" CssClass="text-field" MaxLength="16" Width="100%" />
      </td>
    </tr>
   </table>

  <table cellpadding="1px" cellspacing="1px" style="width:700px" border="0">      
    <tr>
      <td style="width:80px"><label for="txtLogradouro"  class="label">Logradouro</label></td>      
      <td>
        <asp:TextBox ID="txtLogradouro" runat="server" CssClass="text-field" MaxLength="128" Width="100%" />
      </td>
    </tr>
  </table>
      
  <table cellpadding="1px" cellspacing="1px" style="width:700px" border="0">
    <tr>
      <td style="width:80px"><label for="txtBairro" class="label">Bairro</label></td>      
      <td style="width:auto;">
        <asp:TextBox ID="txtBairro" runat="server" CssClass="text-field" MaxLength="128" Width="100%" />
      </td>
      <td style="width:85px;" class="alc">
        <label for="txtComplemento"  class="label">Complemento</label></td>      
      <td style="width:70px;">
        <asp:TextBox ID="txtComplemento" runat="server" CssClass="text-field" MaxLength="128" Width="100%" />
      </td>
    </tr>
  </table>
  
  <table cellpadding="1px" cellspacing="1px" style="width:700px" border="0">  
    <tr>
      <td style="width:80px"><label for="txtTelefone"  class="label">Telefone</label></td>      
      <td style="width:100px;">
        <asp:TextBox ID="txtTelefone" runat="server" CssClass="text-field" MaxLength="16" Width="100%" />
      </td>
      <td style="width:55px;" class="alc">
        <label for="txtContato" class="label">Contato</label>
      </td>      
      <td>
        <asp:TextBox ID="txtContato" runat="server" CssClass="text-field" MaxLength="128" Width="100%" />
      </td>
    </tr>
    <tr>
      <td>
        <label for="txtDescricao" class="label">Descriç&atilde;o</label>
      </td>
      <td colspan="3">
        <asp:TextBox ID="txtDescricao" runat="server" CssClass="text-field" Height="50px" TextMode="MultiLine" Rows="4" Width="100%" />
      </td>
    </tr>
  </table>
  
  <br />
  
  <h2>Dados Q-Matic</h2>
  <table cellpadding="1px" cellspacing="1px" style="width:841px" border="0">  
    <tr>
      <td style="width:80px"><label for="txtBranchNo" class="label">Branch-No</label></td>
      <td style="width:auto" colspan="3">
        <asp:TextBox ID="txtBranchNo" runat="server" CssClass="text-field" MaxLength="20" Width="215px" />
        <sup style="font-size:.9em">#</sup>
        <asp:RangeValidator ID="rnvBranchNo" runat="server" ControlToValidate="txtBranchNo" ErrorMessage="(apenas números)" 
              MaximumValue="9999999999999999999" MinimumValue="1" SetFocusOnError="True" Type="Double"></asp:RangeValidator>
      </td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td style="width:60px"><label for="txtIPLocal" class="label">IP Local</label></td>
      <td style="width:215px">
        <asp:TextBox ID="txtIPLocal" runat="server" CssClass="text-field" MaxLength="32" Width="100%" />
      </td>
      <td style="width:85px" class="alc"><label for="txtPortaSocket" class="label">Porta Socket</label></td>
      <td style="width:auto">
        <asp:TextBox ID="txtPortaSocket" runat="server" CssClass="text-field" MaxLength="5" Width="100%" />
      </td>
      <td style="width:138px">
        <sup style="font-size:.9em">#</sup>
        <asp:RangeValidator ID="rnvPortaSocket" runat="server" ControlToValidate="txtPortaSocket" 
              ErrorMessage="(apenas números)" MaximumValue="99999" MinimumValue="1" SetFocusOnError="True" Type="Integer"></asp:RangeValidator>
      </td>
    </tr>
    <tr>
      <td><label for="txtQSYS" class="label">Doc. QSYS</label></td>
      <td colspan="3">
        <asp:TextBox ID="txtQSYS" runat="server" CssClass="text-field" Height="170px" TextMode="MultiLine" Rows="15" Width="100%" />
      </td>
      <td></td>
    </tr>
    <tr>
      <td><label for="txtQWIN" class="label">Doc. QWIN</label></td>
      <td colspan="3">
        <asp:TextBox ID="txtQWIN" runat="server" CssClass="text-field" Height="170px" TextMode="MultiLine" Rows="15" Width="100%" />
      </td>
      <td></td>
    </tr>
    <tr>
      <td colspan="5">
        <span class="form-note"><sup style="font-size:.9em">#</sup> Esses campos só aceitam números</span>
      </td>
    </tr>
  </table>
  <div class="break">
    <asp:Button ID="cmdVoltarB" runat="server" Text="Voltar" CssClass="form-buttom" CausesValidation="false" />
    <asp:Button ID="cmdEditarB" runat="server" Text="Editar" CssClass="form-buttom" CausesValidation="false" Visible="false" />
    <asp:Button ID="cmdSalvarB" runat="server" Text="Salvar" CssClass="form-buttom" />
  </div>
  

  <search:PesquisaRfs ID="pesquisaRfs" runat="server" />
  <search:PesquisaRegiao ID="pesquisaRegiao" runat="server" />
  <search:PesquisaEspecialista ID="pesquisaEspecialista" runat="server" />
  
  <msgbox:MessageBox ID="MessageBox" runat="server" />
</asp:Panel>
</asp:Content>
